let loadingCount = 0

export const showLoading = (title='加载中') => {
  if (loadingCount === 0) uni.showLoading({ title, mask: true })
  loadingCount++
}

export const hideLoading = () => {
  loadingCount = --loadingCount < 0 ? 0 : loadingCount
  if (loadingCount === 0) uni.hideLoading()
}
